/**
 * @Author: 田乐
 * @Date: 2019/08/27
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019/08/27
 */
const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 菜单路由
const menuRoutes = [
  {
    path: '/projectOperating',
    meta: { title: '营销项目管理', icon: 'el-icon-s-marketing' },
    redirect: '/projectOperating',
    component: RouteView,
    children: [
      {
        path: '/projectOperating/program',
        meta: { title: '项目方案管理' },
        redirect: '/projectOperating/program',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/program/push/index',
            meta: { title: '项目方案下发', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/program/push/index')
          },
          {
            path: '/projectOperating/program/distribution/index',
            meta: { title: '事业部项目方案分配', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/program/distribution/index')
          },
          {
            path: '/projectOperating/program/oemInquire/index',
            meta: { title: '主机厂项目方案查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/program/oemInquire/index')
          },
          {
            path: '/projectOperating/program/departmentInquire/index',
            meta: { title: '事业部项目方案查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/program/departmentInquire/index')
          },
          {
            path: '/projectOperating/program/inquire/index',
            meta: { title: '项目方案查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/program/inquire/index')
          }
        ]
      },
      {
        path: '/projectOperating/plan',
        meta: { title: '营销项目计划管理' },
        redirect: '/projectOperating/plan',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/plan/inquire/indexOem',
            meta: { title: '项目计划查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/plan/inquire/indexOem')
          },
          {
            path: '/projectOperating/plan/planFirstCheck/index',
            meta: { title: '项目计划审核', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/plan/planFirstCheck/index')
          },
          {
            path: '/projectOperating/plan/planLastCheck/index',
            meta: { title: '项目计划二级审核', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/plan/planLastCheck/index')
          },
          {
            path: '/projectOperatingDLR/plan/inquire/DLR/index',
            meta: { title: '项目计划查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/plan/inquire/dealerIndex')
          },
          {
            path: '/projectOperatingDLR/plan/report/index',
            meta: { title: '项目计划提报', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/plan/report/index')
          }
        ]
      },
      {
        path: '/projectOperatingDLR/plan',
        meta: { title: '营销项目计划管理' },
        redirect: '/projectOperatingDLR/plan',
        component: RouteView,
        children: [
          {
            path: '/projectOperatingDLR/plan/inquire/index',
            meta: { title: '项目计划查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/plan/inquire/index')
          },
          {
            path: '/projectOperatingDLR/plan/report/index',
            meta: { title: '项目计划提报', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/plan/report/index')
          }
        ]
      },
      {
        path: '/projectOperating/definition',
        meta: { title: '项目基本参数定义' },
        redirect: '/projectOperating/definition',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/definition/majorClass/index',
            meta: { title: '营销项目大类定义', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/definition/majorClass/index')
          },
          {
            path: '/projectOperating/definition/smallClass/index',
            meta: { title: '营销项目小类定义', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/definition/smallClass/index')
          },
          {
            path: '/projectOperating/definition/materialType/index',
            meta: { title: '营销素材类型定义', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/definition/materialType/index')
          }
        ]
      },
      {
        path: '/projectOperating/summary/dealer',
        meta: { title: '营销项目总结管理' },
        redirect: '/projectOperating/summary/dealer',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/summary/dealer/inquire/index',
            meta: { title: '项目总结查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/summary/dealer/inquire/index')
          },
          {
            path: '/projectOperating/summary/report/index',
            meta: { title: '项目总结提报', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/summary/report/index')
          }
        ]
      },
      {
        path: '/projectOperating/summary',
        meta: { title: '营销项目总结管理' },
        redirect: '/projectOperating/summary',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/summary/oemInquire/index',
            meta: { title: '项目总结查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/summary/oemInquire/index')
          },
          {
            path: '/projectOperating/summary/departmentReview/index',
            meta: { title: '项目总结审核', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/summary/departmentReview/index')
          },
          {
            path: '/projectOperating/summary/oemCheck/index',
            meta: { title: '项目总结抽检', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/summary/oemCheck/index')
          }
        ]
      },
      {
        path: '/projectOperating/case',
        meta: { title: '营销项目案例管理' },
        redirect: '/projectOperating/case',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/case/allInquire/index',
            meta: { title: '全国优秀案例查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/case/allInquire/index')
          }
        ]
      },
      {
        path: '/projectOperating/material',
        meta: { title: '营销项目素材管理' },
        redirect: '/projectOperating/material',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/material/oemDepartmentInquireDLR/index',
            meta: { title: '营销素材查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/material/oemDepartmentInquireDLR/index')
          },
          {
            path: '/projectOperating/material/departmentReviewDLR/index',
            meta: { title: '营销素材信息反馈', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/material/departmentReviewDLR/index')
          },
          {
            path: '/projectOperating/material/oemInquireDLR/index',
            meta: { title: '营销素材信息反馈查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/material/oemInquireDLR/index')
          }
        ]
      },
      {
        path: '/projectOperating/case',
        meta: { title: '营销项目案例管理' },
        redirect: '/projectOperating/case',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/case/oemInquire/index',
            meta: { title: '优秀案例查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/case/oemInquire/index')
          },
          {
            path: '/projectOperating/case/oemCollect/index',
            meta: { title: '优秀案例征集', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/case/oemCollect/index')
          },
          {
            path: '/projectOperating/case/collectInquire/index',
            meta: { title: '案例征集查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/case/collectInquire/index')
          },
          {
            path: '/projectOperating/case/departmentReport/index',
            meta: { title: '优秀案例上传', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/case/departmentReport/index')
          },
          {
            path: '/projectOperating/case/oemDraft/index',
            meta: { title: '优秀案例评选', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/case/oemDraft/index')
          }
          // ,{
          //   path: '/projectOperating/case/allInquire/index',
          //   meta: { title: '全国优秀案例查询(DLR)', keepAlive: true },
          //   component: AsyncComponent('cms-pages/projectOperating/case/allInquire/index')
          // }
        ]
      },
      {
        path: '/projectOperating/material',
        meta: { title: '营销素材管理' },
        redirect: '/projectOperating/material',
        component: RouteView,
        children: [
          {
            path: '/projectOperating/material/departmentService/index',
            meta: { title: '营销素材维护', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/material/departmentService/index')
          },
          {
            path: '/projectOperating/material/oemReview/index',
            meta: { title: '营销素材审核', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/material/oemReview/index')
          },
          {
            path: '/projectOperating/material/oemDepartmentInquire/index',
            meta: { title: '营销素材查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/material/oemDepartmentInquire/index')
          },
          {
            path: '/projectOperating/material/departmentReview/index',
            meta: { title: '营销素材信息反馈审核', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/material/departmentReview/index')
          },
          {
            path: '/projectOperating/material/oemInquire/index',
            meta: { title: '营销素材信息反馈查询', keepAlive: true },
            component: AsyncComponent('cms-pages/projectOperating/material/oemInquire/index')
          }
          // {
          //   path: '/projectOperating/material/departmentReviewDLR/index',
          //   meta: { title: '营销素材信息反馈', keepAlive: true },
          //   component: AsyncComponent('cms-pages/projectOperating/material/departmentReviewDLR/index')
          // }
        ]
      }
    ]
  }
];

export default menuRoutes;
